<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <title>ImageScaling</title>
    <link rel="stylesheet" href="ImageScaling.css">
  </head>
  <body>
    
    <div align="center">
		<script type="text/javascript"><!--
			google_ad_client = "ca-pub-0032065764310410";
			/* Dart Demos */
			google_ad_slot = "0422443712";
			google_ad_width = 728;
			google_ad_height = 90;
			//-->
		</script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
		</script>
		
		<div>
			See the project documentation and source notes here: 
			<a href="https://sites.google.com/site/dartlangexamples/api/dart-html/interface/eventtarget/filereader" target="_blank">FileReader</a>
			<a href="https://sites.google.com/site/dartlangexamples/api/dart-html/interface/element/canvaselement" target="_blank">CanvasElement</a>
		</div>
	
	    <br/>
	    <br/>
	    <br/>
	    
	    <input type="file" id="file"/> &lt;&lt;&lt; Select an jpeg or png image to resize. This will scale the image to a smaller size.<br/>
	    
	    <img id="originImg"/><br/>
	    
	    <canvas id="canvas" width="300" height="300"/><br/>
	    
	    <script type="application/dart" src="ImageScaling.dart"></script>
	    <script src="dart.js"></script>
    
    </div>
    
    <script type="text/javascript">
  	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-32211375-4']);
	  _gaq.push(['_trackPageview']);
	
	  (function() {
	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();
	</script>
    
  </body>
</html>
